<style lang="less" scoped>

.question_list {
  float: left;
  display: inline-block;
  margin: 0 auto;
}
.question {
  text-align: left;
  font-size: 18px;
}

.user-pic {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  float: left;
  background-color: white;
  display: flex;
  flex-direction: row;
  align-items: center;
  border: 1px solid #ccc;
}
.user-pic img {
  width: 100%;
}
.user-content {
  width: 86%;
  float: left;
  margin-left: 20px;
  text-align: left;
}
.time {
  color: #cccccc;
  font-size: 12px;
}
.v-modal {
  z-index: 99 !important;
}
.el-dialog__wrapper {
  z-index: 100 !important;
}
.authorrole {
  font-size: 12px;
}
.delete {
  display: inline;
  position: absolute;
  font-weight: 500;
  right: 60px;
  font-size: 14px;
}
.delete:hover {
  text-decoration: underline;
}
.comment-area{
  width: 1000px;
  margin: 0 auto;
  padding: 0px 15px;
}
.header{
  position: fixed;
  top:0;
  width: 100%;
  min-width: 1210px;
  z-index: 999;
}
</style>
<style lang="less">
.comment-area .send-comment{
  padding: 5px 0 10px 0;
}
</style>

<template>
  <div id="index">
    <div class="header">
      <myheader></myheader>
    </div>
    <Layout id="content" style="margin-top: 60px">
      <Layout :style="{padding: '0px 24px 24px','background-color': 'white','min-width': '1210px'}">
        <div style="padding: 15px 30px">
          <my-breadcrumb :prop="breadcrumbList"></my-breadcrumb>
        </div>
        <div class="comment-area">
          <comment  :point="point"></comment>
        </div>
      </Layout>
    </Layout>
  </div>
</template>

<script>
import comment from "../components/comment.vue";
import header from "../components/header.vue";
import myBreadcrumb from "../components/myBreadcrumb.vue";
import { submitComment } from "../api/api";
import E from "wangeditor";
export default {
  name: "allanswer",
  data: function () {
    return {
      bg: {
        width: `${window.innerWidth}px`,
        height: "auto",
        overflow: "scroll",
      },
      breadcrumbList: [],
      menu: [],
      user: {},
      point: {},
      questions: [],
      showComt: false,
      show_name: "评论",
      editorContent: "",
      show_modal: false,
      userGroup: "",
      postOrNot: true,
      insertIndex: -1,
      posting_id: "",
    };
  },
  created(){
    // 获取面包屑数组
    if (JSON.parse(sessionStorage.getItem("pathList")) != null) {
      let breadcrumbList = JSON.parse(sessionStorage.getItem("pathList"));
      this.breadcrumbList = [...breadcrumbList, {name: '讨论'}]
    }
  },
  mounted() {
    window.onresize = () => {
      return (() => {
        let content_top = document.getElementById("content").offsetTop;
        this.bg.height = `${window.innerHeight - content_top}px`;
        this.bg.width = `${window.innerWidth}px`;
      })();
    };
    let content_top = document.getElementById("content").offsetTop;
    this.bg.height = `${window.innerHeight - content_top}px`;
    this.user = JSON.parse(this.$store.state.user);
    this.point = JSON.parse(sessionStorage.getItem("answerPoint")).point;
  },
  components: {
    myheader: header,
    comment,
    'my-breadcrumb': myBreadcrumb
  },
  methods: {},
};
</script>